package cn.wolfcode.springboot.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
//使用注解来开发

//Scope("prototype") //默认是单例的,使用该注解可以变成多例的
public class SomeBean {

    private OtherBean otherBean;

    
    public SomeBean() {
        System.out.println("SomeBean被创建");
    }
    
    public void init() {
        System.out.println("SomeBean被初始化");
    }
    
    public void destroy() {
        System.out.println("SomeBean被销毁");
    }
}